package com.leo.hadoop.reduce;

import com.leo.hadoop.reduce.*;
import com.leo.util.*;

import java.io.IOException;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.conf.Configuration;

import java.util.regex.Pattern;
import java.util.List;
import java.util.ArrayList;

/**
 * Describe class CountReducer here.
 *
 *
 * Created: Tue Apr 23 21:09:57 2013
 *
 * @author <a href="mailto:leo@leo-pc">Leo</a>
 * @version 1.0
 */
public class CountReducer extends MyReducer {

    /**
     * Creates a new <code>CountReducer</code> instance.
     *
     */
    public CountReducer() {

    }

    @Override
    public void init (Configuration conf) {
    }

    @Override
    public Schema getOutputSchema() {
	return this.schema;
    }

    @Override
    public void process(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {
	for (Text value : values)
	    context.write(key, value);
    }
}
